Skip to content

Conversation

@ranyhb
Copy link

@ranyhb ranyhb commented Jan 13, 2026

  • Introduced include_comments_by_actor and exclude_comments_by_actor inputs in action.yml to allow filtering of comments based on actor usernames.
  • Updated context parsing to handle new input fields.
  • Implemented filterCommentsByActor function to filter comments according to specified inclusion and exclusion patterns.
  • Modified fetchGitHubData to apply actor filters when retrieving comments from pull requests and issues.
  • Added comprehensive tests for the new filtering functionality.

This enhancement provides more control over which comments are processed based on the actor, improving the flexibility of the workflow.


Added two new action inputs (include_comments_by_actor and exclude_comments_by_actor) that let you filter which comments Claude sees based on the comment author's username. Works with wildcards like *[bot] to match all bot accounts.
Why You Need It
Token cost reduction and noise elimination. When PRs have hundreds of bot comments (dependabot, renovate, CI bots, etc.), Claude wastes tokens processing irrelevant content. This can significantly increase your Anthropic API costs and slow down responses.
Problem It Solves
Before:
A PR with 50 dependabot comments + 20 renovate comments + 10 human comments = Claude processes all 80 comments
High token usage → Higher costs
Claude may get distracted by bot noise when reviewing actual code changes
After:

  • uses: anthropics/claude-code-action@v1
    with:
    anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
    exclude_comments_by_actor: "*[bot]" # Exclude all bots
  • uses: anthropics/claude-code-action@v1 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} exclude_comments_by_actor: "*[bot]" # Exclude all bots
    Same PR = Claude only processes 10 human comments
    88% token reduction in this example
    Claude focuses on relevant human feedback
    Lower API costs, faster responses

- Introduced `include_comments_by_actor` and `exclude_comments_by_actor` inputs in action.yml to allow filtering of comments based on actor usernames.
- Updated context parsing to handle new input fields.
- Implemented `filterCommentsByActor` function to filter comments according to specified inclusion and exclusion patterns.
- Modified `fetchGitHubData` to apply actor filters when retrieving comments from pull requests and issues.
- Added comprehensive tests for the new filtering functionality.

This enhancement provides more control over which comments are processed based on the actor, improving the flexibility of the workflow.
@ranyhb
Copy link
Author

ranyhb commented Jan 13, 2026

@ashwin-ant already tested this action, and it worked as expected.

@ranyhb
Copy link
Author

ranyhb commented Jan 13, 2026

@tombakerjr
@dltn
@aws
@ashwin-ant

Hi guys,

I'd love to get your review and suggestions on this PR when you have a chance.

@ranyhb
Copy link
Author

ranyhb commented Jan 13, 2026

I have implemented also an enhancement to using cache (continue) from the previous run. So i think we can also remove the instruction below the
--> implement a new param that if gevin as env var it will just add the <custom_instructions> </custom_instructions> part
what do u think guys?

@ranyhb
Copy link
Author

ranyhb commented Jan 15, 2026

@ashwin-ant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant